package com.xckj.teacher.ui.activity

import com.xckj.teacher.R
import com.xckj.teacher.databinding.ActivityAboutBinding
import com.xckj.teacher.framework.BaseActivity
import com.xckj.teacher.ui.appViewModel
import com.xckj.teacher.util.ActivityMessenger

/**
 * 关于
 */
class AboutAppActivity : BaseActivity<ActivityAboutBinding>() {


    inner class ProxyClick {
        fun back() {
            finish()
        }

        fun use() {
            ActivityMessenger.startActivity<ProtocolActivity>(
                this@AboutAppActivity,
                "data" to appViewModel.about.value?.use_agreement.toString(),
                "name" to "教师使用协议"
            )
        }

        fun yinsi() {
            ActivityMessenger.startActivity<ProtocolActivity>(
                this@AboutAppActivity,
                "data" to appViewModel.about.value?.privacy_agreement.toString(),
                "name" to "教师隐私政策"
            )
        }

        fun child() {
            ActivityMessenger.startActivity<ProtocolActivity>(
                this@AboutAppActivity,
                "data" to appViewModel.about.value?.protect_agreement.toString(),
                "name" to "儿童隐私保护政策"
            )
        }

        fun yinsi2() {
            ActivityMessenger.startActivity<ProtocolActivity>(
                this@AboutAppActivity,
                "data" to appViewModel.about.value?.abstract.toString(),
                "name" to "教师隐私政策摘要"
            )
        }

        fun user_inventory() {
            ActivityMessenger.startActivity<ProtocolActivity>(
                this@AboutAppActivity,
                "data" to appViewModel.about.value?.user_inventory.toString(),
                "name" to "教师个人信息收集清单"
            )
        }

        fun sdk_inventory() {
            ActivityMessenger.startActivity<ProtocolActivity>(
                this@AboutAppActivity,
                "data" to appViewModel.about.value?.sdk_inventory.toString(),
                "name" to "教师第三方共享与SDK清单"
            )
        }

        fun auth_inventory() {
            ActivityMessenger.startActivity<ProtocolActivity>(
                this@AboutAppActivity,
                "data" to appViewModel.about.value?.auth_inventory.toString(),
                "name" to "习教师设备权限清单"
            )
        }


    }


    override fun loadLayout(): Int {
        return R.layout.activity_about
    }

    override fun initData() {
        dataBinding.click = ProxyClick()
    }

    override fun setListener() {

    }
}